Analysis and removal of code clones in software product lines

نویسنده

  • Sandro Schulze
چکیده

Software maintenance is the main driver of total costs in the lifecycle of long-living software systems. Code clones, that is, the replication of code fragments across the system, decrease maintainability: It increases the code size and hinders manual code change, inspection, and analysis. Intensive research has been spent in the last two decades to determine the nature of clones, specifically why and where they occur as well as whether they impair the maintenance of software systems. While recent studies expressed doubt on the general harmfulness of clones, it is commonly accepted that the awareness of existing code clones in software system is indispensable in any case. Recently, software product line engineering gained momentum since it provides a systematic approach for reuse amongst a set of similar programs, commonly referred to as software product lines (SPL). An SPL allows the programmer to manage a set of programs by describing variabilities and commonalities between them in terms of features. In this context, a feature is an increment in end-user visible functionality. As a result, a particular program can be derived by selecting the desired features and subsequently composing all corresponding assets. The goal of this thesis is to bridge the gap between both research areas, reengineering & maintenance (where code cloning belongs to) and software product lines. We argue, that SPLs evolve even more than single software systems and thus, maintenance becomes even more complex. Hence, it is important to figure out specialities of SPLs regarding software reengineering. In this thesis, we focus mainly on code clone analysis and removal. First, we present results from empirical studies that emphasize the existence of clones in SPLs. More specifically, we provide insights why clones occur in SPLs and point out differences between compositional and annotative SPLs. Second, we propose variant-preserving refactorings for compositional software product lines as mean for code clone removal. We present particular refactorings in a cataloguelike manner and demonstrate their applicability by means of a case study.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Towards the Code Clone Analysis in Heterogeneous Software Products

Code clones are parts of source code that were usually created by copy-paste activities, with some minor changes in terms of added and deleted lines, changes in variable names, types used etc. or no changes at all. Clones in code decrease overall quality of software product, since they directly decrease maintainability, increase fault-proneness and make changes harder. Numerous researches deal ...

متن کامل

Using Clone Detection to Manage a Product Line

Clone detection finds code in large software systems that has been replicated and modified by hand. Remarkably, clone detection works because people copy conceptually identifiable blocks of code, and make only a few changes, which means the same syntax is detectably repeated. Each identified clone thus indicates the presence of a useful problem domain concept, and simultaneously provides an exa...

متن کامل

Clone Detection Using Abstract Syntax Trees

Existing research suggests that a considerable fraction (5-10%) of the source code of large-scale computer programs is duplicate code (“clones”). Detection and removal of such clones promises decreased software maintenance costs of possibly the same magnitude. Previous work was limited to detection of either nearmisses differing only in single lexems, or near misses only between complete functi...

متن کامل

A Survey of Software Clone Detection Techniques

If two fragments of source code are identical or similar to each other, they are called code clones. Code clones introduce difficulties in software maintenance and cause bug propagation. Software clones occur due to several reasons such as code reuse by copying pre-existing fragments, coding style, and repeated computation using duplicated functions with slight changes in variables or data stru...

متن کامل

Number 10

If two fragments of source code are identical or similar to each other, they are called code clones. Code clones introduce difficulties in software maintenance and cause bug propagation. Software clones occur due to several reasons such as code reuse by copying pre-existing fragments, coding style, and repeated computation using duplicated functions with slight changes in variables or data stru...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013